package org.spbsu.apco.common.serialization;

/**
 * User: solozobov
 * Date: 12.01.13
 */

/**
 * Object serializer
 */
public interface SerializationMechanism {
    /**
     * @param object object to serialize
     * @return object representation
     */
    byte[] serialize(Object object);

    /**
     * @param representation object representation obtained from serialize(Object) method
     * @return object of the same type and content that was passed by serialize(Object)
     */
    Object deserialize(byte[] representation);
}
